package top.zxybird.yun.serialization.thrift.model;

import com.google.common.base.MoreObjects;
import lombok.*;
import lombok.experimental.Accessors;

@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public abstract class TType {

  /**
   * 类型
   */
  @Getter
  @Setter
  private Byte type;

  /**
   * 编号
   */
  @Getter
  @Setter
  private Short number;

  /**
   * 名称
   */
  @Getter
  @Setter
  private String name;

  @Getter
  @Setter
  private Object value;

  // public abstract Object getValue();

  @Override
  public String toString() {
    final StringBuilder sb = new StringBuilder("TType{");
    sb.append("type=").append(type);
    sb.append(", number=").append(number);
    sb.append(", name='").append(name).append('\'');
    sb.append('}');
    return sb.toString();
  }
}
